#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QDebug>
#include <QFileDialog>

QT_BEGIN_NAMESPACE
namespace Ui { class codeCounter; }
QT_END_NAMESPACE

class codeCounter : public QWidget
{
    Q_OBJECT

public:
    codeCounter(QWidget *parent = nullptr);
    ~codeCounter();

private slots:
    void on_btnOpenFile_clicked();

    void on_btnClear_clicked();

    void on_btnOpenDir_clicked();

private:
    void initForm();
    bool checkFile(const QString& fileName);
    void codeCount(const QString& filePath);
    void codeCount(const QStringList& files);
    void codeCount(const QString& fileName, int & lineCode, int& lineBlank, int& lineNotes);

private:
    Ui::codeCounter *ui;
    QStringList _listFile;

};
#endif // WIDGET_H
